package cn.text.ico;

import java.io.IOException;

import javax.swing.JOptionPane;

import org.apache.http.ParseException;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;

public class Main {
    public static void main(String[] args) throws ParseException, IOException {
        try {
            CloseableHttpClient httpClient = HttpClients.createDefault();
            CloseableHttpResponse httpResponse = null;
            HttpGet request = new HttpGet("https://www.baidu.com/");
            httpResponse = httpClient.execute(request);
            WelcomeInterface.show();
            WelcomeInterface.welcome();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, "错误！（没有连接网络）", "错误！", JOptionPane.ERROR_MESSAGE);
        }
    }
}
